<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>
    学生信息管理平台
</title><link href="Style/StudentStyle.css" rel="stylesheet" type="text/css" /><link href="Script/jBox/Skins/Blue/jbox.css" rel="stylesheet" type="text/css" /><link href="Style/ks.css" rel="stylesheet" type="text/css" />
    <script src="Script/jBox/jquery-1.4.2.min.js" type="text/javascript"></script>
    <script src="Script/jBox/jquery.jBox-2.3.min.js" type="text/javascript"></script>
    <script src="Script/jBox/i18n/jquery.jBox-zh-CN.js" type="text/javascript"></script>
    <script src="Script/Common.js" type="text/javascript"></script>
    <script src="Script/Data.js" type="text/javascript"></script>
    <script type="text/javascript">
        $().ready(function () {
            setStudMsgHeadTabCheck();
            showUnreadSysMsgCount();
        });

        //我的信息头部选项卡
        function setStudMsgHeadTabCheck() {
            var currentUrl = window.location.href;
            currentUrl = currentUrl.toLowerCase();
            var asmhm = "";
            $("#ulStudMsgHeadTab li").each(function () {
                asmhm = $(this).find('a').attr("href").toLowerCase();
                if (currentUrl.indexOf(asmhm) > 0) {
                    $(this).find('a').attr("class", "tab1");
                    return;
                }
            });
        }

        //显示未读系统信息
        function showUnreadSysMsgCount() {
            var unreadSysMsgCount = "0";
            if (Number(unreadSysMsgCount) > 0) {
                $("#unreadSysMsgCount").html("(" + unreadSysMsgCount + ")");
            }
        }

        //更改报考类别
        function changeCateory(thisObj, id) {
            var oldCateoryId = $("#cateoryId").val();
            var cateoryId = "";
            if (id != null) {
                cateoryId = id;
            }
            else {
                cateoryId = thisObj.val();
            }
            var studentId = $("#studentId").val();
            if (cateoryId.length <= 0) {
                jBox.tip("报考类别不能为空！");
                if (id == null) {
                    thisObj.val(oldCateoryId);
                }
            }
            else {
                studentInfo.changeStudentCateory(cateoryId, function (data) {
                    var result = $.parseJSON(data);
                    if ((String(result.ok) == "true")) {
                        window.location.href = "/Index.aspx";
                    }
                    else {
                        jBox.tip(result.message);
                    }
                });
            }
        }
    </script>

    <script type="text/javascript">
        function returnIndex() {
            window.location = "/Index.aspx";
        }
        function showMsg(msg, obj) {
            jBox.tip(msg);
            $("#" + obj).focus();
        }
        function saveClick(studentId) {
            var Ctitle = $("#Ctitle").val();   //消息标题
            if (Ctitle == "" || Ctitle.length>20) {
                showMsg("请您输入消息标题,且不超过20个字！", "Ctitle");
                return false;
            }
            var Ctype = $("#Ctype").val();  //消息类型
            if (Ctype == ("Unselected")) {
                showMsg("请您选择投诉类型！", "Ctype");
                return false;
            }
            var Ccontent = $("#Ccontent").val(); //消息内容
            if (Ccontent == "" || Ccontent.length>80) {
                showMsg("请您输入消息内容，且不超过80个字！", "Ccontent");
                return false;
            }
            StudentCompain.insertCompain(studentId, Ctitle, Ctype, Ccontent, function (data) {
                var obj = $.parseJSON(data);
                if (obj.ok == true) {
                    jBox.alert(obj.message, "提示");
                    setTimeout(function () {
                        window.location.reload();
                    }, 1500);
                }
                else {
                    jBox.tip(obj.message);
                }
            });
        }
    </script>
</head>
<body>

<div class="banner">
    <div class="bgh">
        <div class="page">
            <div id="logo">
                <a href="Index.aspx.html">
                    <img src="images/Student/logo.gif" alt="" width="165" height="48" />
                </a>
            </div>
            <div class="topxx">
                <a
                        href="javascript:">请登录</a>
            </div>

        </div>
    </div>
</div>
<div style="padding:20px;margin:0 auto;width:80%" align="center">
    <form style="margin:0 auto" action="<%=request.getContextPath()%>/app/login.do" method="post">
        邮箱：<input type="text" class="input_2" name="username"/><br/>
        密码：<input type="password" class="input_2" name="password"/><br/>
        <input type="radio" name="type" value="1" checked="checked">学生 <input type="radio" value="2" name="type">教师<br/>
        <input type="submit" class="input2" value="登陆"/>${requestScope.message}
    </form>
</div>
</div>
<jsp:include page="common-footer.jsp"></jsp:include>
</div>
</body>
</html>

